<?php

namespace app\api\controller\v1;

use app\common\controller\BaseController;
use app\common\service\EasyWechatService;

class Setting extends BaseController
{
    /**
     * 关于可语
     */
    public function about()
    {
        $about = getSettingValue('about');
        $this->success('', compact('about'));
    }

    /**
     * 小程序码
     */
    public function code(EasyWechatService $easyWechatService)
    {
        $this->isPost();
        $scene = $this->request->post('scene');
        $page = $this->request->post('page');
        $code = $easyWechatService->wxacode($scene, $page);
        $this->success('', $code);
    }

    /**
     * 服务热线
     */
    public function service()
    {
        $service = getSettingValue('service');
        $this->success('', compact('service'));
    }
}
